package com.ml.mall.entity.catalogue;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author :pl
 * @version :1.0
 * @description :收藏目录添加产品实体类
 * @date :2021/5/26
 **/
@Data
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "收藏目录产品实体类")
@TableName(value = "sys_catalogue_product")
public class SysCatalogueProduct {
    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "主键id")
    private Long id;

    @TableField(value = "create_at",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createAt;

    @TableField(value = "update_at",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    private Date updateAt;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "is_delete",fill = FieldFill.INSERT)
    @TableLogic(value = "0",delval = "1")
    private Integer isDelete;

    @TableField(value = "catalogue_id")
    @ApiModelProperty(value = "收藏目录id")
    private Integer catalogueId;

    @TableField(value = "variant_id")
    @ApiModelProperty(value = "变体id")
    private Long variantId;

    @TableField(value = "pic_url")
    @ApiModelProperty(value = "产品index最小的图")
    private String picUrl;

    @TableField(value = "quality",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "产品数量")
    private Integer quality;
}
